export class TabList {
  // 页内的tab 模型
  tabs = []
  constructor() {
    this.addTab('销售订单信息', 'Details');
    this.addTab('相关信息', 'Relation');
  }
  addTab(label, value, property) {
    const result = {
      label :  label,
      value :  value
    };
    this.tabs.push(result);
  }
}


export class SO {
  "salesRep" =  "duxue"
  "objectStatus" =  "8"
  "objectNo" =  "SO5820"
  "invoiceRemarks" =  ""
  "businessCustomerNo" =  "B0007759"
  "channel" =  "5"
  "aBSOwnerId" =  "hechunxiang"
  "soNo" =  "SO5820"
  "discount" =  null
  "localCurrency" =  null
  "transactionTime" =  "2023-02-17T10 = 22 = 19.379"
  "ownerId" =  "hechunxiang"
  "isActive" =  null
  "uuid" =  "23de2c7e-6dba-40fc-a2ae-27e1ee0528c8"
  "receiverContactAddress" =  "云南省/丽江市/玉龙县/纳西族自治县"
  "reservedStatus" =  "未占货"
  "writeoffAmount" =  null
  "objectType" =  "Regular"
  "finalCustomerName" =  ""
  "totalQuantity" =  1.1
  "exchangeRate" =  1
  "financeCustomerNo" =  "B0007759"
  "invoiceType" =  "Regular"
  "receiverContactPhone" =  "10010001000"
  "contactAddress" =  null
  "id" =  6171
  "invoiceContactName" =  ""
  "originalCurrency" =  "1"
  "shipmentTerm" =  ""
  "invoiceNo" =  "SO5820"
  "brand" =  ""
  "paymentTerms" =  "13"
  "rev" =  4
  "currencyInteger" =  "1"
  "contactName" =  ""
  "refInvoiceNo" =  ""
  "financeCustomerName" =  "广州奥尼服饰有限公司"
  "deptId" =  "9"
  "totalRows" =  1
  "salesAssistant" =  "hechunxiang"
  "customerOwner" =  ""
  "tags" =  ""
  "totalAmount" =  913
  "channelInteger" =  "5"
  "refPrNo" =  null
  "soType" =  "Regular"
  "paymentMethod" =  null
  "allowRoles" =  ""
  "postCode" =  null
  "attachmentIds" =  null
  "taxInvoiceAmount" =  null
  "taxInvoiceDate" =  null
  "paidAmount" =  0
  "deliveryStatus" =  "none"
  "saleChanceCode" =  ""
  "taxInvoiceStatus" =  null
  "operationDate" =  null
  "deliveryTime" =  "2023-02-17T17 = 15 = 06.848"
  "expressNo" =  ""
  "allowUsers" =  ""
  "description" =  null
  "advancePaymentAmount" =  null
  "leadTime" =  null
  "isSync" =  null
  "logoRemark" =  ""
  "invoiceStatusInteger" =  "8"
  "invoiceContactPhone" =  ""
  "receiverContactName" =  "希林娜依"
  "refSoNo" =  null
  "deleteStatus" =  1
  "currency" =  "1"
  "refSoType" =  null
  "businessCustomerName" =  "广州奥尼服饰有限公司"
  "paymentStatus" =  "UnPaid"
  "taxInvoiceCompany" =  null
  "sampleRemark" =  ""
  "glDate" =  null
  "deliveryType" =  6
  "priceListId" =  "LJ2020090110001"
  "updateUser" =  "nanchunyu"
  "invoiceContactAddress" =  ""
  "updateTime" =  "2023-02-23T14 = 51 = 41"
  "factorySeason" =  ""
  "createTime" =  "2023-02-23T14 = 51 = 41"
  "writeoffStatus" =  null
  "confirmationNo" =  ""
  "isAutoWriteoff" =  null
  "createUser" =  "nanchunyu"
  "contactPhone" =  ""
  "businessType" =  "Retail"
  "invoiceStatus" =  "8"
  "remarks" =  ""
  constructor() {
  }
  isShow (item){
    return  item
  }
  format(fieldName, options) {
    let value = this[fieldName];
    return value
    if (value == null) return;
    if (!options) return value;
    let formatter = options.type;
    if (!formatter) return value;
    let option = Object.assign({}, options.option);
    if (option.style == 'currency') option.currency = '';
    const locals = 'zh';
    if (formatter == 'Number') {
      if (option.style === 'currency') option.currency = this._currencyOpt(option.currencyField);
      value = Number(value);
      if (option.style === 'currency' && !option.currency) return value;
    }
    if (formatter == 'DateTime') {
      value = new Date(value);
      option = {
        year: 'numeric',
        month: '2-digit',
        day: '2-digit',
        hour: '2-digit',
        minute: '2-digit',
        second: '2-digit',
        hour12: false,
        ...option
      };
    }
    try {
      formatter = new Intl[`${formatter}Format`](locals, option);
      return formatter.format(value);
    } catch (err) {
      return value;
    }
  }
  find(callback) {
    return this.data.find(callback)
  }
}
